home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
examples
/
Add_Array_vs_Padd_Array.asc
next >
Wrap
Text File
|
1992-09-02
|
623b
|
37 lines
'This example shows the use of the Padd command.
'Beware...if more than 100 is entered, be sure to have a cup of tea.
'
'Two array's containing 1001 elements (0 -> 1000) are first Dimensioned.
'
'Enter 0 (zero) to stop the speed test.
'
Set Buffer 12
Dim X(1000),Y(1000),Z(1000)
Do
Input "Give range, max 1000 : ";_MAX
'
If _MAX=0 Then End
'
T=Timer
For I=1 To 1000
For K=0 To _MAX
Add X(K),2
Next
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
ADRESS_X=Varptr(X(0))
T=Timer
For I=1 To 1000
Padd ADRESS_X,2,0 To _MAX
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
Loop